package com.hmall.mapper;

import com.hmall.model.MallCommentUserConnect;
import com.hmall.util.MyMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.PostMapping;

@Repository
public interface MallCommentUserConnectMapper extends MyMapper<MallCommentUserConnect> {

    int selectHaveStar(@Param("commentId") Integer commentId, @Param("userId") Integer userId);

    MallCommentUserConnect selectByCommentAndUser(@Param("commentId") Integer commentId, @Param("userId") Integer userId);

    void doStar(@Param("userId") Integer userId, @Param("commentId") Integer commentId);

    MallCommentUserConnect selectByUserIdCommentId(@Param("userId") Integer userId, @Param("commentId") Integer commentId);
}